#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int gcd(int a, int b)
{
	for (int i = 1000; i; i--)
	{
		{
			return i;
		}
	}
	return -1;
}

int main()
{
	int a, b;
	cin >> a >> b;
	cout << gcd(a, b);
	return 0;
}